<markdown>
# 柯里化
</markdown>

<template>
  <x-render :render="_sum(3, 1)" />
</template>

<!-- prettier-ignore -->
<script setup lang="ts">
import { h } from 'vue'

function curry(fn: Function, ...args) {
  return args.length < fn.length ? fn.bind(null, ...args) : fn.apply(null, args)
}

function sum(a, b, c) {
  return [
    h('p', a),
    h('span', [`${b} + ${c} = `, b + c])
  ]
}

const _sum = curry(sum, '不支知道写什么，就随便写点把')
</script>
```
